04 Code Filter
What Is It?
If any individual code needs to be displayed only under certain circumstances, the qualification criteria should be specified via the Code Filter property.
How Do I Use This?
The Code Filter is specified in the same way as the Define Filter property (in the Properties Pane). The individual answer will only be displayed to a survey respondent if the filter criteria are met. If the Code Filter field is left blank, the selected answer will always be displayed to survey respondents.
All filters need to be prefaced by the @ symbol.
Examples of Use
If for example, you wanted to ask the following question:
Q2. Which of the following animals would you MOST like to see at the zoo?
Please select ONE only
- Elephant
- Lion
- Tiger
- Sloth
- Urangutan
- Giraffe
- Meerkat
- Other
- Don't know
You may wish to filter the answer codes so that only those animals that can be seen in a particular zoo are visible to survey respondents. In other words, assuming that in a previous question (S1a), the respondent has indicated that they are intending to visit Melbourne Zoo (S1a=2). As there are no sloths to be found at Melbourne Zoo, we can apply a filter (@S1a=2) to that code to remove it from the list of available options for people intending to visit Melbourne zoo, but it remains visible to those visiting other zoos.
Source Question Type | Example Filter |
Single | @Q4=2 (filter to those who gave an answer of code 2 in Q4) |
Multi | @Q4_2=1 (filter to those who gave an answer of code 2 in Q4) |
Multi | @Q4_2=0 Or @Q4_2 is null (filter to those who DIDN'T give an answer of code 2 in Q4) |
Single | @Q1 = 2 Or @Q4 = 2 (filter to those who gave an answer of code 2 in Q1 OR Q2) |
Single |
(@Q1 = 2 Or @Q1 = 3) And @Q4 = 2 (filter to those who gave an answer of code 2 OR 3 in Q1 AND code 2 in Q2) |
Multi | @Q4_Count>1 (filter to those who gave more than one answer in Q4) |